/*   1:    */
package com.course.utils.binary;
/*   2:    */
/*   3:    */

import java.nio.charset.Charset;

/*   4:    */

/*   5:    */
/*   6:    */
/*   7:    */ public class StringUtils
        /*   8:    */ {
    /*   9:    */
    private static byte[] getBytes(String string, Charset charset)
    /*  10:    */ {
        /*  11: 50 */
        if (string == null) {
            /*  12: 51 */
            return null;
            /*  13:    */
        }
        /*  14: 53 */
        return string.getBytes(charset);
        /*  15:    */
    }

    /*  36:    */
    /*  57:    */
    public static byte[] getBytesUtf8(String string)
    /*  58:    */ {
        /*  59:192 */
        return getBytes(string, Charsets.UTF_8);
        /*  60:    */
    }

    /*  66:    */
    /*  67:    */
    private static String newString(byte[] bytes, Charset charset)
    /*  68:    */ {
        /*  69:214 */
        return bytes == null ? null : new String(bytes, charset);
        /*  70:    */
    }

    /*  71:    */
    /* 111:    */
    /* 112:    */
    public static String newStringUtf8(byte[] bytes)
    /* 113:    */ {
        /* 114:340 */
        return newString(bytes, Charsets.UTF_8);
        /* 115:    */
    }
    /* 116:    */
}



/* Location:           C:\Users\Fenix\Downloads\commons-codec-1.8.jar

 * Qualified Name:     org.apache.commons.codec.binary.StringUtils

 * JD-Core Version:    0.7.0.1

 */